package cocurrency.lock;

import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * Created by luzl on 4/7/2017.
 */
public class Main {
    public static void main(String[] args){
        Integer count=0;
        ReadWriteLock lock=new ReentrantReadWriteLock();
        CyclicBarrier cyclicBarrier=new CyclicBarrier(10);
        for(int i=0;i<10;i++){
            new LockThread(lock,"Seq"+i,count,cyclicBarrier).start();
        }
    }
}
